#include "section-info.h"

SectionInfo::SectionInfo()
    : m_section(SmGlobal::UnknownSection),
      m_databaseClient(0)
{
}

void SectionInfo::setSection (SmGlobal::SectionType section)
{
    m_section = section;
}

void SectionInfo::setDescription (QString description)
{
    m_description = description;
}

void SectionInfo::setDatabaseClient (QSharedPointer<AbstractDatabaseClient> databaseClient)
{
    m_databaseClient = databaseClient;
}

void SectionInfo::setLoadingParameters(const QVariantList &parameters)
{
    m_loadingParameters = parameters;
}


SmGlobal::SectionType SectionInfo::section() const
{
    return m_section;
}

QString SectionInfo::description() const
{
    return m_description;
}

QSharedPointer<AbstractDatabaseClient> SectionInfo::databaseClient() const
{
    return m_databaseClient;
}

QVariantList SectionInfo::loadingParameters() const
{
    return m_loadingParameters;
}

#ifndef QT_NO_DEBUG
#include <QDebug>
QDebug operator<< (QDebug debug, const SectionInfo& sectionInfo)
{
    debug << "SectionInfo:"
          << "databaseClient:" << sectionInfo.databaseClient()
          << "description:" << sectionInfo.description()
          << "loading parameters:" << sectionInfo.loadingParameters()
          << "section" << sectionInfo.section();
    return debug;
}
#endif
